import { apiPrefix } from '@/consts/consts'


export default ({ $service:request }) => ({
  // 4.3.1．程序列表
  programList(params) {
    return request({
      url: `${apiPrefix}/api/v1/program/list`,
      method: 'get',
      params
    })
  },

  // 4.3.2．新增程序
  programAdd(data) {
    return request({
      url: `${apiPrefix}/api/v1/program/add`,
      method: 'post',
      data
    })
  },
  
  // 4.3.3．编辑程序
  programUpdate(data, id) {
    return request({
      url: `${apiPrefix}/api/v1/program/update/${id}`,
      method: 'put',
      data
    })
  },
    
  // 4.3.4．删除程序
  programDelete(id) {
    return request({
      url: `${apiPrefix}/api/v1/program/delete/${id}`,
      method: 'delete',
    })
  },

})
